<template>
  <div id="app">
    <!-- 导航菜单 -->
    <nav class="navbar">
      <router-link to="/" class="nav-link" exact-active-class="active">Home</router-link>
      <router-link to="/about" class="nav-link" active-class="active">About</router-link>
      <router-link to="/todolist" class="nav-link" active-class="active">TodoList</router-link>
    </nav>

    <!-- 路由视图 -->
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.navbar {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.nav-link {
  padding: 10px 20px;
  margin: 0 10px;
  text-decoration: none;
  color: #2c3e50;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: #e0e0e0;
}

.nav-link.active {
  background-color: #42b983;
  color: white;
}
</style>
        
        

